<template>
	<div class="app">
		<h2>我是App组件</h2>
		<h3>{{msg}}</h3>
		<h3>我收到的学校名：{{name}}</h3>
		<School :demo="demo"/>
	</div>
</template>

<script>
	import School from './components/School'

	export default {
		name:'App',
		components:{School},
		data() {
			return {
				msg:'欢迎学习Vue',
				name:''
			}
		},
		methods:{
			demo(value){
				console.log('我收到了数据',value)
				this.name = value
			}
		}
	}
</script>

<style>
	.app{
		background-color: pink;
		padding: 10px;
	}
</style>